Modern laser and inkjet printers generally receive image data from host processor, with the image data being formatted either in a control language format or a pixel-based bitmap format. When the host processor provides image data in a control language format (e.g., Printer Control Language (PCL), PostScript etc.), the receiving printer initially parses the control language into a "page intermediate" format. The page intermediate format segregates a page of data into page strips which are handled as integral units and enable a conservation of raster buffer memory. For instance, a printer may allocate sufficient buffer memory to handle only three page strips, whereas an entire page may comprise 8 to 10 page strips. By handling the page strips serially, page strip buffer memory regions can be reused for succeeding page strips, thereby preserving memory space for other printer functions.
Each page intermediate page strip is converted by a rasterizer into a bitmap format which is suitable for rendering by a connected print engine (i.e, either a laser, inkjet or equivalent print engine). The rasterizer function, in high performance printers, is often performed by an image processor chip whose operations are controlled by a control program.
There are two general command categories that the image processor understands: (I) a page intermediate descriptor of a geometric object or a pre-rasterized picture; and (ii) graphics state information. Geometric object information enables the image processor to set appropriate pixels in a current page strip to reflect the particular parameters of a geometric object. In a sense, the image processor draws the object into the current page strip. Such geometric objects include: rule operations; trapezoid operations; short, thin vector operations; short, triangle operations; etc., etc. Pre-rasterized pictures are handled "as is", as they are already in a rasterized form and are therefore able to be fed directly to the print engine. A further set of objects that are fed to the image processor are "graphics state" objects which include patterns; clipping windows; and various logical operations; etc.
When the image processor is provided with page intermediate data, including both geometric object descriptions and graphics state information, such information is provided in the form of a display list. Display lists are static structures containing either marking or non-marking objects. Within any particular display list, the order of non-marking to marking objects is important. Since the display list is traversed in a first-in/first-out manner, the graphics state objects must precede any marking object because the marking object may depend upon the state constructed from previous objects. For instance, it is the programmer's job to construct the display list to assure that red vector objects are preceded by all graphics state objects that are necessary to describe a red solid vector (or any other specified color).
Pattern descriptions are indicated by a pattern display list object. A pattern is an arrangement of pixels for an image area to be filled with the pattern which provides a recurring background image. Unlike color, patterns do not indicate color, rather they mask (or hide) color. Color and patterns objects are sent to the image processor which combines the respective operators to provide the desired color space representation of the received pattern arrangement.
Often, a received pattern must be scaled and/or tiled to fit within current dimensions of a marking object (e.g. a square, triangle, rectangle . . . etc.). Pattern scaling must occur whenever the pattern does not fit into the user-defined or default input window. Inconsistencies in scale must be addressed before tiling is performed. For example, consider a very small pattern that is downloaded from the host processor. The host processor, wanting to conserve transfer time and processing assets, sends a "thumbnail" of the pattern to the printer. Along with the thumbnail, the host processor sends scaling ratios by establishing destination window parameters that are larger than the source window. Before the pattern is consumed by the printer, it must be scaled to the destination window. Pattern scaling is akin to general raster scaling and, in fact, uses the same algorithms.
When a printer rasterizes a pattern image, individual scan lines of the pattern are accessed as needed. If the image processor wishes to fill a portion of a scan line that is larger than the pattern width, then the pattern is "tiled" i.e., repeated, in order to fill the scan line. Pattern tiling occurs when a scale pattern is not large enough to cover the surface area of the marking object from the display list. This necessitates the need to re-index through the tile representation of the pattern and to re-use portions previously used.
Since the image processor supports the tiling action, the programmer can reduce the amount of memory required by allocating memory to store only the unique portions of a pattern, which are then reused as necessary.
The image processing function in a printer must be able, during a tiling operation, to anchor a tile of a pattern anywhere on a page strip and still tile the pattern as though it is anchored at (or close to) the X=0, Y=0 origin point of the page strip--i.e., generally the upper left corner of the page strip. Further, since page strips are printed, one after the other, down the length of a page, the periodicity of a pattern must be maintained from page strip to page strip, or else there will be discontinuities in the pattern image at the page strip boundaries. Thus, when a pattern appears in one page strip, the "phase" of the pattern must be consistently handled from page strip to page strip in the tile action to avoid such discontinuities. As a result, the necessity to be able to anchor a pattern anywhere within a page strip dictates that the proper pixel positions to access in the pattern must be able to be found, give the position of the original pattern anchor and the anchor of the object which is to be filled by the pattern.
Prior art printers have generally handled the scaling, tiling and anchoring of pattern arrangements during the page intermediate processing, before presentation to the image processor. Such a processing technique can be very costly and redundant, especially in the case of high frequency patterns (e.g. ones which exhibit repetitions of every five or fewer pixels).
Accordingly, it is an object of this invention to provide an improved procedure for the handling of graphics state information during a rasterizing action in a printer.
It is another object of this invention to provide a method and apparatus for handling graphics state information which enables a rasterizer, on a real time basis, to convert graphics state information into a bitmap presentation.